<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:set var="count" scope="request">0</c:set>
<div>
	<div class="statTitle">${result.text}</div>
	<div class="statText"> 有效记录数: ${result.count} </div>
	<table bgcolor="#CCCCCC" border="0" cellspacing="1" cellpadding="2">
		<tr class="tableTitle">
			<td>${result.text}</td>
			<td>数量</td>
			<td>所占比例%</td>
		</tr>
		<tbody bgcolor="#FFFFFF">
		<c:forEach items="${result.industrySet}" var="industry">
			<tr>
				<td>${industry[0]}</td>
				<td>${industry[1]}</td>
				<td>
				<c:choose>
					<c:when test="${result.count != 0}">
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">${industry[1]/result.count}</fmt:formatNumber>
					</c:when>
					<c:otherwise>
						<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">0</fmt:formatNumber>
					</c:otherwise>
				</c:choose>
				</td>
			</tr>
			<c:set var="count">${count + industry[1]}</c:set>
		</c:forEach>
		</tbody>
		<tr class="tableTitle">
			<td>合计</td>
			<td>${count}</td>
			<td>
			<c:choose>
				<c:when test="${count <= result.count && result.count != 0}">
					<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">${count/result.count}</fmt:formatNumber>
				</c:when>
				<c:when test="${result.count == 0}">
					<fmt:formatNumber type="percent" maxIntegerDigits="3" maxFractionDigits="2">0</fmt:formatNumber>
				</c:when>
			</c:choose>
			</td>
		</tr>
	</table>
</div>